Skip to content

[multiple-commpaths] Allows colon-separated commpath list - #196

Open
rountree wants to merge 5 commits into
llnl:develfrom
rountree:multiple-commpaths
Open

[multiple-commpaths] Allows colon-separated commpath list#196
rountree wants to merge 5 commits into
llnl:develfrom
rountree:multiple-commpaths

Conversation

@rountree

@rountree rountree commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Per-server selection, first path in --commpaths that works for that server gets picked. No consensus process, as the commpath is not visible outside of the server and its particular clients.

@rountree
rountree requested a review from mplegendre July 6, 2026 02:45
@rountree
rountree force-pushed the multiple-commpaths branch 2 times, most recently from 2d223fe to 8c7c63f Compare July 10, 2026 06:37
mplegendre and others added 2 commits July 10, 2026 09:53
Replaces --commpath with --commpaths.
Takes a colon-separated list of commpaths.
The choice of which of those to use is made per-server.
The first workable path is selected.  The paths may differ
from server to server:  unlike --cachepaths, there is no
consensus process.
@mplegendre

Copy link
Copy Markdown
Member

@rountree - Are you working on fixing the CI failures?

@rountree
rountree force-pushed the multiple-commpaths branch from 07e1a40 to 1072473 Compare August 1, 2026 02:41
@rountree

rountree commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

@mplegendre Yes. What's queued up for this coming Friday is:

  1. A PR adding workflows for granular resource manager testing and log recovery via artifacts.
  2. A FAQ on how to launch GitHub workflows, monitor progress, and download artifacts all via the command line.
  3. A PR with most of the low-hanging-fruit configure file changes.
  4. A patched multiple-commpaths PR that passes repeated invocations of the existing ci.yml workflow.

See ci-artifacts branch/PR for description.

The workflows need be added here as the files are
required to be both in the default branch as well
as the branch using the workflows.
@rountree
rountree force-pushed the multiple-commpaths branch from 44a204f to bd856fa Compare August 5, 2026 17:49
@rountree

rountree commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Debugging notes:

Running bd856fa (tip of multiple-commpaths at the moment)
3/13 ci.yml failures
a) Flux, Running: ./run_driver --dependency --push, Error: The operation was canceled. 17m 27s, 31038941417
b) slurm-rshlaunch, SOME TESTS FAILED (no failures logged), 2m 9s, 31038944077
c) slurm-srun, SOME TESTS FAILED (no failures logged), 1m 18s, 31038929449

Running c0170276 (tip of devel)
3/31 ci.yml
a) Flux, Running: ./run_driver --dependency --push, Error: The operation was canceled., 17m 7s, 31043385441
b) ditto
c) ditto

Running bd856fa (multiple-commpaths)
0/31 ci-slum-srun-artifacts failures
0/31 ci-slurm-artifacts failures


Running bd856fa (multiple-commpaths)
4/13 ci.yml failures, 3 Flux, 1 Run spindle-slurm-ubuntu testsuite


Running c0445ae (testing-multiple-commpaths)
Run 31106514887 job 92632975191 "Slurm srun, Ubuntu"

At this point GitHub actions became unusably slow.

The good news is that the podman port can replicate the problem on rzadams with a 4% failure rate.

@nchaimov
nchaimov self-requested a review August 7, 2026 17:32
Comment thread .github/workflows/ci-slurm-plugin-artifacts.yml Outdated

static char* exitSocketPath(spindle_args_t *params)
{
char *realized_dir, *socket_path = NULL;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
char *realized_dir = NULL, *socket_path = NULL;

With the change below, if getFirstValidPath returns -1, we goto done without ever assigning to realized_dir; before these changes, we would always assign to realized_dir. Since the done block checks the value of realized_dir, we need to initialize it to NULL.

snprintf(options_str, 32, "%lu", (unsigned long) params->opts);
string options(options_str);

getFirstValidPath( params->commpaths, &( params->commpath ), params->number );

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to handle the case where getFirstValidPath returns -1

Comment thread configure.common.ac Outdated
Comment thread src/flux/sessionmgr.c
#if !defined(COMMPATH)
#error COMMPATH must be defined in config.h
#endif
#define SESSIONPATH "/tmp/spindle/session"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should hard-code a path for the session directory

Comment thread src/flux/sessionmgr.c
return NULL;
}

result = spindle_mkdir(dir);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old code called spindle_mkdir to ensure that the session directory exists, but the new code doesn't. Do we still need the spindle_mkdir?

Comment thread configure.common.ac
[AS_HELP_STRING([--with-compath=DIR],[Back-end directory for communication and housekeeping])],
[COMMPATH=${withval}],
[COMMPATH=$DEFAULT_LOC])
AC_ARG_WITH(commpaths,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to still accept the old commpath (singular) form so that existing configure arguments continue to work

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above line increased the size of the buffer, but this line still null-terminates at the original size; is that correct?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Matt doubled the buffer length. Git blame says:

68bacdf8 src/client/client_comlib/client_api.c (Matthew LeGendre 2026-06-22 11:17:35 -0700  45)    char buffer[2*(MAX_PATH_LEN+1)];
af4cd951 src/client/client_comlib/client_api.c (Barry            2025-10-03 09:52:29 -0700  46)    buffer[MAX_PATH_LEN] = '\0';

The buffer is only used for the reply message (LDCS_MSG_CHOSEN_CACHEPATH) which copies two directory names into the buffer for a total length of strlen(procdata->cachepath) + 1 + strlen(procdata->parsed_cachepath) + 1. There's no check on the sending side if that value is <= 2*(MAX_PATH_LEN+1), although there may be an implied check upstream.

The line adding the null terminator is not doing anything useful. Adding one to the end of buffer might prevent a segfault if the incoming strings were malformed but otherwise fit into the buffer.

On my own projects I use calloc() instead of malloc() unless there's a good reason not to. Your preference?

rountree and others added 2 commits August 12, 2026 06:22
For the slurm-plugin case, fix copy/paste error by updating container names to those found in docker-compose.yml.  (h/t Nick)

Co-authored-by: Nicholas Chaimov <nchaimov@gmail.com>
Typo fix.  h/t Nick.

Co-authored-by: Nicholas Chaimov <nchaimov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants